package org.dtrd.modules.control.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.dtrd.modules.control.entity.po.DtrdEntRdSigninTarget;
import org.dtrd.modules.control.entity.po.DtrdEntRdSigninTargetDetail;

import java.util.List;

/**
 * @Entity modules.control.domain.DtrdEntRdSigninTarget
 */
public interface DtrdEntRdSigninTargetMapper extends BaseMapper<DtrdEntRdSigninTarget> {

    DtrdEntRdSigninTarget getLastTargetInfo(@Param("patientId") Integer patientId);

    /**
     * 获取患者的所有控制目标id
     */
    List<Integer> selectPatientTargetIds(@Param("patientId") Integer patientId, @Param("startDate") String startDate, @Param("endDate") String endDate);

    /**
     * 根据 patientId 查询控制目标
     */
    List<DtrdEntRdSigninTargetDetail> selectTargetDetailsByPatientId(@Param("patientIds") List<Integer> patientIds);
}




